package com.ciei.dpagm.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.util.Objects;

/**
 * @author fangnuozhou
 * @since 2020/08/31
 */
@TableName(value = "common_log")
public class Log implements java.io.Serializable {

    @TableId(type = IdType.AUTO)
    private Integer logId;
    private String logType;
    private String logInfo;
    private Integer operatorId;
    private String operatorAccount;
    private String operatorName;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    private String remoteAddress;
    private String browserName;
    private String dataBeforeUpdate;
    private String dataAfterUpdate;
    private String module;
    private String objectId;

    public Log() {

    }

    public Log(Integer logId, String logType, String logInfo, Integer operatorId, String operatorAccount, String operatorName, Date createTime, String remoteAddress, String browserName, String dataBeforeUpdate, String dataAfterUpdate, String module, String objectId) {
        this.logId = logId;
        this.logType = logType;
        this.logInfo = logInfo;
        this.operatorId = operatorId;
        this.operatorAccount = operatorAccount;
        this.operatorName = operatorName;
        this.createTime = createTime;
        this.remoteAddress = remoteAddress;
        this.browserName = browserName;
        this.dataBeforeUpdate = dataBeforeUpdate;
        this.dataAfterUpdate = dataAfterUpdate;
        this.module = module;
        this.objectId = objectId;
    }

    public Integer getLogId() {
        return logId;
    }

    public void setLogId(Integer logId) {
        this.logId = logId;
    }

    public String getLogType() {
        return logType;
    }

    public void setLogType(String logType) {
        this.logType = logType;
    }

    public String getLogInfo() {
        return logInfo;
    }

    public void setLogInfo(String logInfo) {
        this.logInfo = logInfo;
    }

    public Integer getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(Integer operatorId) {
        this.operatorId = operatorId;
    }

    public String getOperatorAccount() {
        return operatorAccount;
    }

    public void setOperatorAccount(String operatorAccount) {
        this.operatorAccount = operatorAccount;
    }

    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getRemoteAddress() {
        return remoteAddress;
    }

    public void setRemoteAddress(String remoteAddress) {
        this.remoteAddress = remoteAddress;
    }

    public String getBrowserName() {
        return browserName;
    }

    public void setBrowserName(String browserName) {
        this.browserName = browserName;
    }

    public String getDataBeforeUpdate() {
        return dataBeforeUpdate;
    }

    public void setDataBeforeUpdate(String dataBeforeUpdate) {
        this.dataBeforeUpdate = dataBeforeUpdate;
    }

    public String getDataAfterUpdate() {
        return dataAfterUpdate;
    }

    public void setDataAfterUpdate(String dataAfterUpdate) {
        this.dataAfterUpdate = dataAfterUpdate;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getObjectId() {
        return objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Log log = (Log) o;
        return Objects.equals(logId, log.logId) &&
                Objects.equals(logType, log.logType) &&
                Objects.equals(logInfo, log.logInfo) &&
                Objects.equals(operatorId, log.operatorId) &&
                Objects.equals(operatorAccount, log.operatorAccount) &&
                Objects.equals(operatorName, log.operatorName) &&
                Objects.equals(createTime, log.createTime) &&
                Objects.equals(remoteAddress, log.remoteAddress) &&
                Objects.equals(browserName, log.browserName) &&
                Objects.equals(dataBeforeUpdate, log.dataBeforeUpdate) &&
                Objects.equals(dataAfterUpdate, log.dataAfterUpdate) &&
                Objects.equals(module, log.module) &&
                Objects.equals(objectId, log.objectId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(logId, logType, logInfo, operatorId, operatorAccount, operatorName, createTime, remoteAddress, browserName, dataBeforeUpdate, dataAfterUpdate, module, objectId);
    }
}
